import request from '@/utils/request'

export function getList(params) {
  return request({
    url: '/table/list',
    method: 'get',
    params
  })
}

export default {
  getHospSetList(current, limit, searchObj) {
    return request({
      url: `/admin/hosp/hospitalSet/findPage/${current}/${limit}`,
      method: 'post',
      data: searchObj  //使用json形式传递
    })
  },
  //根据医院设置信息id删除医院设置信息
  deleteHospSetById(id) {
    return request({
      url: `/admin/hosp/hospitalSet/${id}`,
      method: 'delete'
    })
  },
  //批量删除医院设置
  hospSetBatchRemove(ids) {
    return request({
      url: `/admin/hosp/hospitalSet/batchRemove`,
      method: 'delete',
      data: ids
    })
  },
  //锁定和取消锁定lockHospitalSet
  lockHospitalSet(id, status) {
    return request({
      url: `/admin/hosp/hospitalSet/lockHospitalSet/${id}/${status}`,
      method: 'put'
    })
  },
  //添加医院设置
  saveHospSet(hospitalSet) {
    return request({
      url: `/admin/hosp/hospitalSet/saveHospital`,
      method: 'post',
      data: hospitalSet
    })
  },
  //根据id获取医院设置信息
  getHospSet(id) {
    return request({
      url: `/admin/hosp/hospitalSet/getHospSet/${id}`,
      method: 'get'
    })
  },
  // 修改医院设置功能
  updataHospitalSet(hospitalSet) {
    return request({
      url: `/admin/hosp/hospitalSet/updataHospitalSet`,
      method: 'post',
      data:hospitalSet
    })
  },
}